package org.ricks.gen;


import org.ricks.ioc.utils.ThreadUtils;

public class Demo {
    public static void main(String[] args) {
        EnhancedSnowflake idGenerator = new EnhancedSnowflake();

        // 生成分片ID为3的全局唯一ID
        long id1 = idGenerator.nextId(3);
        long id2 = idGenerator.nextId(5);

        System.out.println("生成的分片ID1：" + id1);
        System.out.println("生成的分片ID2：" + id2);


        ThreadUtils.sleep(10000L);
    }
}

